export function isValidNumber(number) {
    return isNaN(Number(number)) ? 0 : Number(number)
}

export function roundToDecimalPlace(number = 0, decimalPlaces = 2) {
    const factor = Math.pow(10, decimalPlaces);
    return Math.round(isValidNumber(number) * factor) / factor;
}
